<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 数据表格</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <!-- Data Tables -->
    <link href="css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
</head>

<body class="gray-bg">
    <!--     <div class="row">
        <div class="col-sm-6">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>服务器类型统计</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                        <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="echarts" id="echarts-pie-chart"></div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>存储容量统计</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                        <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="echarts" id="echarts-pie-chart1"></div>
                </div>
            </div>
        </div>
    </div> -->
    <button type="button" class="btn btn-primary">
        <!--弹出按钮-->
        弹出来
    </button>
    <div id="myModal" class="modal fade bs-example-modal-lg">
        <!--模态框-->
        <div class="modal-dialog modal-lg" style="height: 80%">
            <div class="modal-content" style="height: 100%;">
                <div id="box" style="height: 100%">
                    234
                    <div class="echarts" id="echarts-pie-chart"></div>
                </div>
                <!--给echarts准备的容器-->
            </div>
        </div>
    </div>
    <!-- 全局js -->
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <script src="js/plugins/jeditable/jquery.jeditable.js"></script>
    <!-- Data Tables -->
    <script src="js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <!-- 自定义js -->
    <script src="js/content.js?v=1.0.0"></script>
    <!-- ECharts demo data -->
    <script src="js/demo/echarts-demo.js"></script>
    <!-- ECharts -->
    <script src="js/plugins/echarts/echarts-all.js"></script>
    <script type="text/javascript">
        $('.btn').click(function () {
            $('#myModal').modal(); //点击按钮弹出模态框
        })


        var pieChart = echarts.init(document.getElementById("echarts-pie-chart"));
        var pieoption = {
            title: {
                text: '服务器类型统计',
                subtext: '纯属虚构',
                x: 'center'
            },
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b} : {c} ({d}%)"
            },
            legend: {
                orient: 'vertical',
                x: 'left',
                data: ['虚拟机', 'windows', 'Linux']
            },
            calculable: true,
            series: [{
                name: '访问来源',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data: [
                    { value: 335, name: '虚拟机' },
                    { value: 310, name: 'windows' },
                    { value: 234, name: 'Linux' }
                ]
            }]
        };
        pieChart.setOption(pieoption);


        $('#myModal').on('shown.bs.modal', function () {
            pieChart.resize()
        })
    </script>
    <script>
    // $(document).ready(function() {
    //     $('.dataTables-example').dataTable();

    //     /* Init DataTables */
    //     var oTable = $('#editable').dataTable();

    //     /* Apply the jEditable handlers to the table */
    //     oTable.$('td').editable('../example_ajax.php', {
    //         "callback": function(sValue, y) {
    //             var aPos = oTable.fnGetPosition(this);
    //             oTable.fnUpdate(sValue, aPos[0], aPos[1]);
    //         },
    //         "submitdata": function(value, settings) {
    //             return {
    //                 "row_id": this.parentNode.getAttribute('id'),
    //                 "column": oTable.fnGetPosition(this)[2]
    //             };
    //         },

    //         "width": "90%",
    //         "height": "50%"
    //     });

    // });
    </script>
</body>

</html>